<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>菜单管理</title>
    <link rel="stylesheet" href="../src/css/bootstrap.min.css">
    <link rel="stylesheet" href="../src/css/font-awesome.min.css">
    <link rel="stylesheet" href="../src/css/style.min.css">
    <script src="../src/js/jquery-3.3.1.min.js"></script>
    <script src="../src/js/bootstrap.min.js"></script>
    <script src="../src/js/table.js"></script>
</head>
<script type="text/javascript">
$(function(){
	$("#del").on('click',function(){
		var del = confirm("确认删除？");
		/*if(del){
			$.get('',function(){
				location.reload();
			});
		}*/
	});
	var page = 1;//当前表格第几页
	$.ajax({
		url:'/menu/getlist?p='+page,
		type:'get',
		dataType:'json',
		success:function(data){
			console.log(data);
			listMenu(data.data,"menu");
		}
	});
});
</script>
<body>

            <section class="content-container">
                <div class="content-wrapper">
                    <div class="bread-crumb">
                        <h5 class="b-inner clearfix">
                            <b class="tit">菜单管理</b>
                            <span class="float-right">
                                <button type="button" class="btn btn-primary" data-toggle="modal" data-target=".j-open-modal-center">
                                    <i class="fa fa-plus"></i> 添加权限菜单
                                </button>
                            </span>
                        </h5>

                    </div>
                    <form class="form-inline">

                        <div class="form-group mr-2">
                            <label>关键字：</label>
                            <input type="text" class="form-control">
                        </div>
                        <button type="submit" class="btn btn-info mr-2"><i class="fa fa-search"></i> 搜索</button>

                    </form>
                    <br>
                    <table class="table table-hover">
                        <thead>
                            <tr class="table-info-bg">
                                <th>

                                </th>
                                <th>
                                    <div class="cell" id="name">菜单</div>
                                </th>
                                <th>
                                    <div class="cell" id="id">ID</div>
                                </th>
                                <th>
                                    <div class="cell" id="p_name">上级菜单</div>
                                </th>
                                <th>
                                    <div class="cell" id="href">URl</div>
                                </th>
                                <th>
                                    <div class="cell" id="permission">权限</div>
                                </th>
                                <th>
                                    <div class="cell" id="type_name">类型</div>
                                </th>
                                <th>
                                    <div class="cell" id="soft">排序</div>
                                </th>
                                <th>
                                    <div class="cell">操作</div>
                                </th>

                            </tr>
                        </thead>
                        <tbody>
                            <!-- <tr>
                                <td>
                                    <div class="cell">
                                        <input type="checkbox">
                                    </div>
                                </td>
                                <td>
                                    <div class="cell" id="name">
                                        用户管理
                                    </div>
                                </td>
                                <td>
                                    <div class="cell" id="id">125</div>
                                </td>
                                <td>
                                    <div class="cell" id="p_name">无</div>
                                </td>
                                <td>
                                    <div class="cell" id="href">/edit/2</div>
                                </td>
                                <td>
                                    <div class="cell" id="permission">delete,edit</div>
                                </td>
                                <td>
                                    <div class="cell" id="type_name">菜单</div>
                                </td>
                                <td>
                                    <div class="cell" id="soft">10</div>
                                </td>
                                <td>
                                    <div class="cell">
                                        <a href="menu_edit.html" class="btn btn-outline-primary btn-sm">编辑</a>
                                        <button type="button" class="btn btn-outline-danger btn-sm">删除</button>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                    <td>
                                        <div class="cell">
                                            <input type="checkbox">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="cell">
                                            用户管理
                                        </div>
                                    </td>
                                    <td>
                                        <div class="cell">125</div>
                                    </td>
                                    <td>
                                        <div class="cell">无</div>
                                    </td>
                                    <td>
                                        <div class="cell">/edit/2</div>
                                    </td>
                                    <td>
                                        <div class="cell">delete,edit</div>
                                    </td>
                                    <td>
                                        <div class="cell">菜单</div>
                                    </td>
                                    <td>
                                        <div class="cell">10</div>
                                    </td>
                                    <td>
                                        <div class="cell">
                                            <a href="menu_edit.html" class="btn btn-outline-primary btn-sm">编辑</a>
                                            <button type="button" class="btn btn-outline-danger btn-sm">删除</button>
                                        </div>
                                    </td>
                                </tr> -->
                        </tbody>
                        <tfoot>
                            <tr class="table-info-bg">
                                <th>
                                    <div class="cell">
                                        <input type="checkbox">
                                    </div>
                                </th>
                                <th colspan="8">
                                    <div class="cell">
                                        <div class="form-inline">
                                            <label for="exampleFormControlSelect1" class="mr-3">全选</label>
                                            <select class="form-control" id="exampleFormControlSelect1">
                                                <option>批量操作</option>
                                                <option>删除</option>
                                            </select>
                                        </div>
                                    </div>
                                </th>
                            </tr>
                        </tfoot>
                    </table>
                    <nav aria-label="...">
                        <ul class="pagination">
                            <li class="page-item disabled">
                                <a class="page-link" href="#" tabindex="-1">Previous</a>
                            </li>
                            <li class="page-item"><a class="page-link" href="#">1</a></li>
                            <li class="page-item active">
                                <a class="page-link" href="#">2</a>
                            </li>
                            <li class="page-item"><a class="page-link" href="#">3</a></li>
                            <li class="page-item"><a class="page-link" href="#">4</a></li>
                            <li class="page-item"><a class="page-link" href="#">5</a></li>
                            <li class="page-item"><a class="page-link" href="#">6</a></li>
                            <li class="page-item">
                                <a class="page-link" href="#">Next</a>
                            </li>
                        </ul>
                    </nav>
                </div>

            </section>

</body>

</html>